﻿using System;
using System.Collections.Generic;
using HK.Core.Common.Data;
using HK.Core.Common.Protocol;
using HK.Core.Common.Protocol.Data;
using HK.Core.Serializable;
using HK.Core.Serializable.Data;
using HK.Core.Serializable.Protocol.Data;
using HK.Editor.GUIEx.Protocol.Drawer;

namespace HK.Editor.Serializable.Protocol
{
    /// <summary>
    /// 接口 : 序列化资产文件编辑器 - 列表
    /// </summary>
    /// <typeparam name="TAsset"></typeparam>
    /// <typeparam name="TBody"></typeparam>
    /// <typeparam name="TElement"></typeparam>
    public interface ISAssetListEditor<out TAsset, out TBody, TElement>
        where TAsset : SAsset, ISAssetList<TBody, TElement>
        where TBody : SAssetListData<TBody, TElement>
        where TElement : JsonData, IListElement, IEquatable<TElement>
    {
        /// <summary>
        /// 序列化文件自身
        /// </summary>
        TAsset Self { get; }
        
        /// <summary>
        /// 序列化文件数据 - Body
        /// </summary>
        TBody Body { get; }
        
        /// <summary>
        /// 列表
        /// </summary>
        List<TElement> List { get; }
        
        /// <summary>
        /// 编辑器模式下的序列化文件
        /// </summary>
        bool IsEditor { get; }

#region Draw

#region Header

        /// <summary>
        /// 头部绘制器
        /// </summary>
        ISAssetHeaderDrawer HeaderDrawer { get; }

#endregion

#endregion
        
    }
}